package com.sichem.domain.trade.service.filter;

import com.sichem.domain.trade.adapter.repository.ITradeRepository;
import com.sichem.domain.trade.model.entity.GroupBuyActivityEntity;
import com.sichem.domain.trade.model.entity.TradeRuleCommandEntity;
import com.sichem.domain.trade.model.entity.TradeRuleFilterBackEntity;
import com.sichem.domain.trade.service.ITradeOrderService;
import com.sichem.domain.trade.service.factory.TradeRuleFilterFactory;
import com.sichem.types.design.framework.link.model2.handler.ILogicHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author xiangshizhen
 * @Date 2025/3/17
 */

@Service
@Slf4j
public class ActivityUsabilityRuleFilter implements ILogicHandler<TradeRuleCommandEntity, TradeRuleFilterFactory.dynamicContext, TradeRuleFilterBackEntity> {

    @Resource
    private ITradeRepository repository;

    @Override
    public TradeRuleFilterBackEntity apply(TradeRuleCommandEntity requestParameter, TradeRuleFilterFactory.dynamicContext dynamicContext) throws Exception {
        log.info("交易规则过滤-活动可用性校验{} activityId:{}",requestParameter.getUserId(), requestParameter.getActivityId());

        GroupBuyActivityEntity groupBuyActivity = repository.queryGroupBuyActivityByActivityId(requestParameter.getActivityId());



        return null;
    }


}
